import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView,
        children: [
            {
                path: '/sys-admin/index',
                component: () => import('../views/SystemAdmin/AdminIndexView.vue')
            },
            {
                path: '/sys-admin/product/room-particulars',
                component: () => import('../views/SystemAdmin/Product/RoomParticularsView')
            },
            {
                path: '/sys-admin/product/room-modification',
                component: () => import('../views/SystemAdmin/Product/RoomModificationView')
            },
            {
                path: '/sys-admin/product/client-list',
                component: () => import('../views/SystemAdmin/Product/ClientListView')
            },
            {
                path: '/sys-admin/product/admin-management',
                component: () => import('../views/SystemAdmin/Product/AdminManagementView')
            },
            {
                path: '/sys-admin/product/history-order-management',
                component: () => import('../views/SystemAdmin/Product/HistoryOrderManagementView')
            },
            {
                path: '/sys-admin/product/subscribe-order-management',
                component: () => import('../views/SystemAdmin/Product/SubscribeOrderManagementView')
            },
        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/LoginView.vue')
    }
]
const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
